﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AzureGames.Model
{
    /// <summary>
    /// A message to be passed to and distributed from the inotificationrepository
    /// </summary>
    public class Notification : BaseDataObject
    {
        public enum STATE { Pending, Delivered };

        /// <summary>
        /// id to identify the notification
        /// </summary>
        public Guid ID { get; set; }
        /// <summary>
        /// player the message should be sent to
        /// </summary>
        /// <remarks>Guid.Empty indicates a broadcast</remarks>
        public string PlayerID { get; set; }
        /// <summary>
        /// the game definition id if the message is only applicable to a particular game
        /// </summary>
        /// <remarks>0 indicates a broadcast</remarks>
        public int GameDefinitionID { get; set; }
        /// <summary>
        /// BoardID the message is relevant to (re., the instance of the game)
        /// </summary>        
        public Guid BoardID { get; set; }
        /// <summary>
        /// if the message as been delivered successfully
        /// </summary>
        public STATE State { get; set; }
        /// <summary>
        /// the content of the message
        /// </summary>
        /// <remarks>this will most likely be JSON content</remarks>
        public string Message { get; set; }

        public object Data { get; set; }

        /// <summary>
        /// the playerID that originated the message
        /// </summary>
        public string SenderID { get; set; }
    }
}
